package com.pine.dao.pineframework.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pine.common.database.entity.BaseEntity;
import com.pine.dao.pineframework.constants.GenderEnum;
import com.pine.dao.pineframework.constants.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * <p>
 * 用户表
 * </p>
 *
 * @author pine manage
 * @since 2024-08-12
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sys_user")
@Schema(name = "SysUser", description = "用户表")
public class SysUser extends BaseEntity<Long> implements Serializable {

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 698087312000017143L;

    @Schema(description = "用户账号")
    private String loginAccount;

    @Schema(description = "用户名称")
    private String username;

    @Schema(description = "密码")
    private String password;

    @Schema(description = "部门id")
    private Long deptId;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "性别:1=男,2=女,0=保密")
    private GenderEnum gender;

    @Schema(description = "年龄")
    private Integer age;

    @Schema(description = "出生日期")
    private LocalDateTime birthday;

    @Schema(description = "电话")
    private String phone;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "状态:1=启用,0=禁用")
    private StatusEnum status;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "创建人id")
    private Long createUserId;

    @Schema(description = "更新人id")
    private Long updateUserId;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
}
